<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('Link/index')}">导航菜单</a></li>
        <li><a href="{:url('Nav/add')}">添加导航</a></li>
    </ul>

    <form class="well form-inline margin-top-20" method="get" action="{:url('Nav/index')}">
        <input type="text" class="form-control" name="keyword" style="width: 120px;" value="{:input('request.keyword','')}" placeholder="支持id,导航菜单搜索" style="width: 200px">
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('Nav/index')}">清空</a>

    </form>
    <form method="post" class="js-ajax-form margin-top-20" action="{:url('Nav/order')}">
        <div class="table-actions">
            <button type="submit" class="btn btn-primary btn-sm js-ajax-submit">排序</button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="16"><label>
                    <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label>
                </th>
                <th width="50">排序</th>
                <th width="50">ID</th>
                <th>导航菜单</th>
                <th>二级id</th>
                <th>链接</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="nav" item="v">
                <tr>
                    <td><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></td>
                    <td><input name='list_orders[{$v.id}]' class="input input-order mr5" type='text' size='3'  style="width: 50px"
                               value='{$v.list_order}'></td>
                    <td>{$v.id}</td>
                    <td>{$v.p_id}</td>
                    <td>{$v.title}</td>
                    <td>{$v.url}</td>
<!--                    <td>-->
<!--                        <eq name="$v.switch" value="1">-->
<!--                            <button type="button" class="btn btn-success">是</button>-->
<!--                            <else>-->
<!--                                <button type="button" class="btn btn-danger">否</button>-->
<!--                            </else>-->
<!--                        </eq>-->

<!--                    </td>-->
                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('Nav/edit',['id' => $v['id']])}">编辑</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Nav/del',['id' => $v['id']])}">
                            删除
                        </a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">
            {$nav->render()}
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
</body>
</html>
